home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / www / src / fminit2.0 / MifRead < prev    next >
Encoding:
Text File  |  1992-11-17  |  2.3 KB  |  67 lines

  1. #! /bin/sh
  2. # Shell file to convert various formats to Mif
  3. # $Id: MifRead,v 1.2 92/11/17 21:58:23 connolly Exp $
  4. #
  5. # Edit as needed to execute other filters; 
  6. # The cases below should match the contents of file .fminit2.0/suffixlist 
  7. #
  8. # Three filters are provided with standard Maker: One reads files with the
  9. # suffix ".txtalt" and converts them to mif, attempting to recognize paragraphs.
  10. # The second reads and converts MML files. See the Reference Manual for
  11. # more information.  The third filter converts old format documents into
  12. # mif so they can be read by FrameMaker 3.0.
  13. #
  14. # Inputs are:
  15. # $1 = input file to be filtered (full path, example: /usr/drf/foo.bar )
  16. # $2 = output file from filter   (full path, example: /usr/drf/foo.tmp )
  17. # $3 = input file's path         (           example: /usr/drf         )
  18. # $4 = .fminit2.0's directory
  19. # $5 = maker's bin directory
  20. #
  21. # See what the file type is, and run the appropriate program
  22. case $1 in
  23.     *.is1) $5/is1tomif <$1 >$2;;
  24.     *.rm8) $5/rm8tomif <$1 >$2;;
  25.     *.txtalt) $5/txttomif <$1 >$2;;
  26.     *.mml|*.framemml) $5/mmltomif -I$3 -I~ -I$4 <$1 >$2;;
  27.     *#D13)
  28.         # This is a fake suffix for Maker's use.
  29.         # dr=`expr "$1" : '\(.*\)#D13'`    #-- expr loses if $1 long
  30.         dr=`echo "$1" | sed 's/#D13$//'`
  31.         $5/1.3binarytomif "$dr" "$2"
  32.         ;;
  33.     *.m) $5/trofftomif   <$1 >$2;;
  34.     *.man) $5/trofftomif -man <$1 >$2;;
  35.     *.1) $5/trofftomif -man <$1 >$2;;
  36.     *.2) $5/trofftomif -man <$1 >$2;;
  37.     *.3) $5/trofftomif -man <$1 >$2;;
  38.     *.4) $5/trofftomif -man <$1 >$2;;
  39.     *.5) $5/trofftomif -man <$1 >$2;;
  40.     *.6) $5/trofftomif -man <$1 >$2;;
  41.     *.7) $5/trofftomif -man <$1 >$2;;
  42.     *.8) $5/trofftomif -man <$1 >$2;;
  43.     *.me) $5/trofftomif -me <$1 >$2;;
  44.     *.ms) $5/trofftomif -ms <$1 >$2;;
  45.     *.dca) $5/dcatomif   <$1 >$2;;
  46.     *.rft) $5/dcatomif   <$1 >$2;;
  47.     *.iaf) $5/iaftomif   <$1 >$2;;
  48.     *.wp) $5/wptomif   <$1 >$2;;
  49.     *.cgm) $5/cgmtomif   <$1 >$2;;
  50.     *.c960) $5/c960tomif   <$1 >$2;;
  51.     *.cc) $5/c960tomif   <$1 >$2;;
  52.     *.dxf) $5/dxftomif   <$1 >$2;;
  53.     *.hpgl) $5/hpgltomif   <$1 >$2;;
  54.     *.iges) $5/igestomif   <$1 >$2;;
  55.     *.igs) $5/igestomif   <$1 >$2;;
  56.     *.w3) $5/wordtomif   <$1 >$2;;
  57.     *.w4) $5/wordtomif   <$1 >$2;;
  58.     *.msw) $5/wordtomif   <$1 >$2;;
  59.     *.pct) $5/picttomif   <$1 >$2;;
  60.     *.html) echo converting html file: $1
  61.         fix-html.pl $1 >/tmp/mifread.$$.sgml
  62.         sgmls html.dtd /tmp/mifread.$$.sgml | xlisp html2mml.l \
  63.         | $5/mmltomif -I$3 -I~ -I$4 >$2
  64.         #@@ rm /tmp/mifread.$$.sgml
  65.         ;;
  66. esac
  67.